<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qtsoap.cpp -->
<head>
  <title>QtSoapQName Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="57" height="67" border="0" /></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a></td>
</tr></table><h1 class="title">QtSoapQName Class Reference</h1>
<p>The QtSoapQName class provides a wrapper for QNames (names with namespaces). <a href="#details">More...</a></p>
<pre> #include &lt;QtSoapQName&gt;</pre><ul>
<li><a href="qtsoapqname-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#QtSoapQName">QtSoapQName</a></b> ( const QString &amp; <i>name</i> = QString::null, const QString &amp; <i>uri</i> = QString::null )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#dtor.QtSoapQName">~QtSoapQName</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#name">name</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#uri">uri</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QtSoapQName &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#operator-eq">operator=</a></b> ( const QString &amp; <i>s</i> )</td></tr>
</table>
<hr />
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#operator-lt-10">operator&lt;</a></b> ( const QtSoapQName &amp; <i>s1</i>, const QtSoapQName &amp; <i>s2</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qtsoapqname.html#operator-eq-eq-39">operator==</a></b> ( const QtSoapQName &amp; <i>s1</i>, const QtSoapQName &amp; <i>s2</i> )</td></tr>
</table>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QtSoapQName class provides a wrapper for QNames (names with namespaces).</p>
<p>This class is used extensively in QtSoap to define and identify header and body elements, including method and argument names.</p>
<p>The QtSoapQName consists of a name and a URI. The URI is used as the name's namespace, i.e&#x2e; the name is qualified (hence 'Q'-Name) by the URI. The <a href="qtsoapqname.html#name">name</a>() and <a href="qtsoapqname.html#uri">uri</a>() functions return the QNames's name and URI.</p>
<p>The QtSoapQName can be empty. It can also have just a name with no URI. Special handling is often applied to a QtSoapQName that has no URI. Typically, if a QName with no namespace is used in an element in a SOAP document that already has a default namespace defined, then that namespace will be applied to the QName.</p>
<pre> QtSoapMessage message;

 message.setMethod(QtSoapQName(&quot;sendMessage&quot;, &quot;http:<span class="comment">//messenging.example.com/&quot;));</span>
 message.addMethodArgument(QtSoapSimpleType(QtSoapQName(&quot;a&quot;), 15));</pre>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QtSoapQName"></a>QtSoapQName::QtSoapQName ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>name</i> = QString::null, const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>uri</i> = QString::null )</h3>
<p>Constructs a QName. Sets the QName name to <i>name</i> and the URI to <i>uri</i>.</p>
<h3 class="fn"><a name="dtor.QtSoapQName"></a>QtSoapQName::~QtSoapQName ()</h3>
<p>Destructs the <a href="qtsoapqname.html">QtSoapQName</a>.</p>
<h3 class="fn"><a name="name"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtSoapQName::name () const</h3>
<p>Returns QName's name.</p>
<h3 class="fn"><a name="uri"></a><a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> QtSoapQName::uri () const</h3>
<p>Returns the QName's URI.</p>
<h3 class="fn"><a name="operator-eq"></a>QtSoapQName &amp; QtSoapQName::operator= ( const <a href="http://qt.nokia.com/doc/4.6/qstring.html">QString</a> &amp; <i>s</i> )</h3>
<p>Sets the QName's name to <i>s</i>, and sets the URI to an empty string.</p>
<hr />
<h2>Related Non-Members</h2>
<h3 class="fn"><a name="operator-lt-10"></a>bool operator&lt; ( const QtSoapQName &amp; <i>s1</i>, const QtSoapQName &amp; <i>s2</i> )</h3>
<p>If <i>s2</i> has a non-empty URI, this function returns true if the merge of the URI and the name of <i>s1</i> is lexically less than that of <i>s2</i>; otherwise it returns false.</p>
<p>If <i>s2</i> has an empty URI, this function returns true if the name of <i>s1</i> is lexically less than the name of <i>s2</i>; otherwise it returns false.</p>
<p>The comparison is case-insensitive.</p>
<h3 class="fn"><a name="operator-eq-eq-39"></a>bool operator== ( const QtSoapQName &amp; <i>s1</i>, const QtSoapQName &amp; <i>s2</i> )</h3>
<p>If <i>s2</i> has a non-empty URI, this function returns true if the merge of the URI and the name of <i>s1</i> is equal to that of <i>s2</i>; otherwise it returns false.</p>
<p>If <i>s2</i> has an empty URI, this function returns true if the name of <i>s1</i> is equal to the name of <i>s2</i>; otherwise it returns false.</p>
<p>The comparison is case-insensitive.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="40%" align="center"><a href="http://qt.nokia.com/doc/trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt Solutions</div></td>
</tr></table></div></address></body>
</html>
